<<<<<<< HEAD
<!DOCTYPE html>
<html data-dpr="1" style="font-size: 38px;">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1,maximum-scale=1,user-scalable=no">
<meta name="apple-mobile-web-app-capable" content="yes">
<meta name="apple-mobile-web-app-status-bar-style" content="black">
<title>鲜果商场</title>
<link rel="stylesheet" href="__PUBLIC__/xsd/css/mui.min.css">
=======

<!DOCTYPE html>
<html>
<head>
    <title>获取共享地址</title>
    <meta charset="utf-8" />
    <meta id="viewport" name="viewport" content="width=device-width; initial-scale=1.0; maximum-scale=1; user-scalable=no;" />
>>>>>>> 37581d8edb7a0b22980c59b2b5580e0a44b60b5e
<script src="__PUBLIC__/js/jquery.js"></script>
<script src="__PUBLIC__/xsd/js/mui.min.js"></script>
<script src="__PUBLIC__/xsd/js/flexible.js"></script>
<script src="__PUBLIC__/xsd/js/template.js"></script>
<<<<<<< HEAD
 <script src="http://res.wx.qq.com/open/js/jweixin-1.2.0.js" charset="utf-8"></script>

<!-- <script>
$(document).ready(function(){ 
    wx.config({$wxoptions|json_encode});

    wx.error(function(e){

      	console.log(e);

      });

    wx.getLocation({
    type: 'wgs84', // 默认为wgs84的gps坐标，如果要返回直接给openLocation用的火星坐标，可传入'gcj02'
    success: function (res) {
        var latitude = res.latitude; // 纬度，浮点数，范围为90 ~ -90
        var longitude = res.longitude; // 经度，浮点数，范围为180 ~ -180。
        var speed = res.speed; // 速度，以米/每秒计
        var accuracy = res.accuracy; // 位置精度
     //alert(JSON.stringify(res));
     
    
     $.get("http://apis.map.qq.com/ws/geocoder/v1/?location="+latitude+","+longitude+"&key={$mapkey}&get_poi=0&output=jsonp&callback=?",function(data) {
     console.log(data);
     if(data.status==0){
       var province = data.result.address_component.province;
     province = preg_replace('/市/',"",province);
     province = preg_replace('/省/',"",province);
     var city = data.result.address_component.city;
      city = preg_replace('/市/',"",city);
     var qu = data.result.address_component.district;
     $("#address1").val(province+" "+city+" "+qu);
     $("#address2").val(province+" "+city+" "+qu);
     
     }
     
    },'jsonp');   
      
    }
});
});
</script> -->
</head>
<!--/head-->
<body>
fffaabbddss

<p><button onclick="geoFindMe()">Show my location</button></p>
<div id="out"></div>


<div>
        <span class="fill-type">小区/大厦/学校：</span>
        <a class="fill-section-right showmap" href="javascript:;">
            <i class="icon-loc-hollow addr-icon mui-icon mui-icon-location"></i>
            <i class="addr-arrow"></i>
            <input type="text" class="addr-choose j-address" name="address" readonly placeholder="点击选择(请耐心等待)" value="{$info.latlng ? $info.address : ''}" />
            <input type="hidden" class="addr-choose j-address" name="address_full" value="{$info.latlng ? $info.address_full : ''}" />
            <input type="hidden" class="addr-choose j-address" name="latlng" value='{$info.latlng} ' />
              <input type="hidden"  name="type" value='0' />
        </a>
    </div>

</body>
</html>
<script>

       $(function(){
            $('.showmap').on('click', function(){
            	alert("1111");
                getLocation();
                 // $('#map').show()
                // $('#content').hide()
              })
         
          
         function getLocation() {	
         	alert("222");	
         	wx.getLocation({	
         				
         		type : 'gcj02', // 默认为wgs84的gps坐标，如果要返回直接给openLocation用的火星坐标，可传入'gcj02'			
         		success : function(res) {				//使用微信内置地图查看位置接口				
         			wx.openLocation({					
         				latitude : res.latitude, // 纬度，浮点数，范围为90 ~ -90					
         				longitude : res.longitude, // 经度，浮点数，范围为180 ~ -180。					
         				name : '我的位置', // 位置名					
         				address : '329创业者社区', // 地址详情说明					
         				scale : 28, // 地图缩放级别,整形值,范围从1~28。默认为最大					
         				infoUrl : 'http://www.gongjuji.net' // 在查看位置界面底部显示的超链接,可点击跳转（测试好像不可用）
         							
                                   });			
                                   },			
                                   cancel : function(res) {							
                                   	}		
                                   	});
                                   	alert("333");
}
});
	
</script>
=======
</head>

<body>

<script type="text/javascript" src="http://res.wx.qq.com/open/js/jweixin-1.1.0.js"></script>
<script type="text/javascript">
wx.config({$wxoptions|json_encode});
 wx.ready(function () { 
  });  
 function getaddr() { wx.openAddress({ success: function (res) { 
 // 用户成功拉出地址
  alert(JSON.stringify(res));
   document.getElementById("showAddress").innerHTML="收件人："+res.userName+"  联系电话："+res.telNumber+"  收货地址："+res.proviceFirstStageName+res.addressCitySecondStageName+res.addressCountiesThirdStageName+res.addressDetailInfo+"  邮编："+res.addressPostalCode; 
}, 

 cancel: function (errMsg) {
  // 用户取消拉出地址 //
  alert(JSON.stringify(errMsg)); }}); }




     </script>



    <div class="showaddr"  ><a  href="javascript:getaddr();"><strong>点击设置收货地址</strong></a>
    </div>
    <div id="showAddress"></div>

</body>
</html>

>>>>>>> 37581d8edb7a0b22980c59b2b5580e0a44b60b5e
